home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1082 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. Path: engnews1.Eng.Sun.COM!taumet!clamage
  2. From: vandevod@cs.rpi.edu (David Vandevoorde)
  3. Newsgroups: comp.std.c++
  4. Subject: Re: Interpretation Sought for DWP Concept of 'Valid Object'
  5. Date: 15 Apr 1996 02:47:37 GMT
  6. Organization: RPI Computer Science
  7. Sender: vandevod@avs.cs.rpi.edu
  8. Approved: clamage@eng.sun.com (comp.std.c++)
  9. Message-ID: <xso7mviv2g6.fsf@avs.cs.rpi.edu>
  10. References: <4kltuk$73j@bmtlh10.bnr.ca>
  11. NNTP-Posting-Host: taumet.eng.sun.com
  12. X-Nntp-Posting-Host: avs.cs.rpi.edu
  13. In-Reply-To: "john's message of 12 Apr 1996 09:26:06 PDT
  14. X-Newsreader: Gnus v5.1
  15. Content-Length: 1082
  16. Originator: clamage@taumet
  17.  
  18. >>>>> "JH" == "john (j d ) hickin" <hickin@bnr.ca> writes:
  19. [...]
  20. JH> A recent thread in another newsgroup has aroused some interest.
  21. JH> Lately there has been a small debate around the interpretation of
  22. JH> the following phrase, ostensibly taken from the DWP:
  23.  
  24. JH>     A reference shall be initialized to refer to a valid object or
  25. JH>     function.
  26.  
  27. I checked and could find no such wording. Instead, I found:
  28.  
  29.   [dcl.init.ref] 8.5.3/1
  30.   A  variable  declared  to  be  a  T&,  that  is  "reference to type T"
  31.   (_dcl.ref_), shall be initialized by an object, or function, of type T
  32.   or by an object that can be converted into a T.
  33.  
  34. JH> One party claims that valid object means initialized object while
  35. JH> another claims that all is required is that the object have a
  36. JH> valid address.
  37.  
  38. JH> Does the DWP make it clear which interpretation should be used?
  39.  
  40. I'm not at all sure that the DWP uses the phrase `valid object' at
  41. all. If it did, I would expect it to mean `an object whose lifetime
  42. has begun and not expired'; the lifetime of an object is defined in
  43. [basic.life].
  44.  
  45.     Daveed
  46.  
  47.  
  48. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  49. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  50. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  51. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  52. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  53.